﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master"
    CodeBehind="GalleryPhones.aspx.vb" Inherits="Nokia_Smartphones.GalleryPhones" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <br />
    </p>
    <p>
        &nbsp;<asp:ListView ID="ListView2" runat="server" DataSourceID="SqlDataSource2" 
            GroupItemCount="3">
            <AlternatingItemTemplate>
                <td id="Td1" runat="server" style="background-color:#FFF8DC;">
                <a href='AddComments.aspx?ID=<%# Eval("ID") %>'>
                    <asp:Image ID="Image1" runat="server" CssClass = "phoneGallery"  ImageUrl='<%# Eval("Picture") %>'
                        Width="300px" /><br />
                        </a>
                </td>
            </AlternatingItemTemplate>
            <EditItemTemplate>
                <td id="Td2" runat="server" style="background-color:#008A8C;color: #FFFFFF;">
                    <a href='AddComments.aspx?ID=<%# Eval("ID") %>'>
                    <asp:Image ID="Image1" runat="server"  ImageUrl='<%# Eval("Picture") %>'
                        Width="300px" /><br />
                     </a>
                    <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                        Text="Update" />
                    <br />
                    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                        Text="Cancel" />
                    <br />
                </td>
            </EditItemTemplate>
            <EmptyDataTemplate>
                <table id="Table1" runat="server" 
                    style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;">
                    <tr>
                        <td>
                            No data was returned.</td>
                    </tr>
                </table>
            </EmptyDataTemplate>
            <EmptyItemTemplate>
<td id="Td3" runat="server" />
            </EmptyItemTemplate>
            <GroupTemplate>
                <tr ID="itemPlaceholderContainer" runat="server">
                    <td ID="itemPlaceholder" runat="server">
                    </td>
                </tr>
            </GroupTemplate>
            <InsertItemTemplate>
                <td id="Td4" runat="server" style="">
                   <a href='AddComments.aspx?ID=<%# Eval("ID") %>'>
                   <asp:Image ID="Image1" runat="server" CssClass = "phoneGallery"  ImageUrl='<%# Eval("Picture") %>'
                        Width="300px" /> <br />
                        </a>
                    <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                        Text="Insert" />
                    <br />
                    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                        Text="Clear" />
                    <br />
                </td>
            </InsertItemTemplate>
            <ItemTemplate>
                <td id="Td5" runat="server" style="background-color:#DCDCDC;color: #000000;">
                   <a href='AddComments.aspx?ID=<%# Eval("ID") %>'>
                    <asp:Image ID="Image1" runat="server" CssClass = "phoneGallery"  ImageUrl='<%# Eval("Picture") %>'
                        Width="300px" /> <br />
                        </a>
                </td>
            </ItemTemplate>
            <LayoutTemplate>
                <table id="Table2" runat="server">
                    <tr id="Tr1" runat="server">
                        <td id="Td6" runat="server">
                            <table ID="groupPlaceholderContainer" runat="server" border="1" 
                                style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;">
                                <tr ID="groupPlaceholder" runat="server">
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr id="Tr2" runat="server">
                        <td id="Td7" runat="server" 
                            style="text-align: center;background-color: #CCCCCC;font-family: Verdana, Arial, Helvetica, sans-serif;color: #000000;">
                            <asp:DataPager ID="DataPager1" runat="server" PageSize="12">
                                <Fields>
                                    <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                                        ShowLastPageButton="True" />
                                </Fields>
                            </asp:DataPager>
                        </td>
                    </tr>
                </table>
            </LayoutTemplate>
            <SelectedItemTemplate>
                <td id="Td8" runat="server" 
                    style="background-color:#008A8C;font-weight: bold;color: #FFFFFF;">
                   <a href='AddComments.aspx?ID=<%# Eval("ID") %>'>
                   <asp:Image ID="Image1" runat="server" CssClass = "phoneGallery"  ImageUrl='<%# Eval("Picture") %>'
                        Width="300px" /><br />
                        </a>
                </td>
            </SelectedItemTemplate>
        </asp:ListView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:PhonesConn %>" 
            ProviderName="<%$ ConnectionStrings:PhonesConn.ProviderName %>" 
            SelectCommand="SELECT [Picture], [ID] FROM [Phones]"></asp:SqlDataSource>
    </p>
    <p>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:PhonesConn %>"
            ProviderName="<%$ ConnectionStrings:PhonesConn.ProviderName %>" SelectCommand="SELECT [ID], [Brand], [Model_Number], [Year_Make], [Price], [Picture], [Adding_User], [Description] FROM [Phones]">
        </asp:SqlDataSource>
    </p>
    <p>
    </p>
    <p>
    </p>
</asp:Content>
